<!--
 * @Author: alenjzhang
 * @Date: 2024-04-21 16:19:52
 * @Description: 服务对象
-->
<script setup>
import Nav from '@/components/nav';
import CheckItem from '@/components/check-item';
import Preview from '@/components/preview';

const arr = ref(Array.from({ length: 10 }).fill({}));
const checkable = ref(false);

function onCheckable() {
  checkable.value = !checkable.value;
}
</script>

<template>
  <Nav title="testtitle" />
  <view class="wrap">
    <view>服务对象</view>
    <view class="flex items-center">
      <nut-icon icon="home" />
      <view class="ml1" @click="onCheckable">
        {{ checkable ? '取消' : '批量打卡' }}
      </view>
    </view>
  </view>
  <view v-if="!checkable" class="wrap my2">
    <view>服务示例</view>
    <Preview />
  </view>
  <scroll-view scroll-y="true" class="mt5 overflow-auto service-content">
    <view class="mb4">
      1楼 - 101青竹林
    </view>
    <CheckItem v-for="(_, i) in arr" :key="i" :checkable="checkable" />
  </scroll-view>
</template>

<style lang="scss"></style>

<route lang="json">
</route>
